from PyQt4.QtGui import QAction
from PyQt4.QtCore import QObject
from PyQt4.QtCore import SIGNAL

class ViewMenu(object):

    def __init__(self, menu, tool, main):
        self._main = main

        treeAction = menu.addAction('Hide/Show &File Manager')
        treeAction.setCheckable(True)
        #editorAction = self.addAction('Hide/Show &Editor')
        webAction = menu.addAction('Hide/Show &Web Previewer')
        webAction.setCheckable(True)

        tool.addAction(webAction)
        tool.addAction(treeAction)

        QObject.connect(treeAction, SIGNAL("triggered()"), self._main._showTree)
        QObject.connect(webAction, SIGNAL("triggered()"), self._main._showWeb)
